package com.itheima.health.dao;

import com.itheima.health.pojo.HotSetmeal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

/**
 * PROJECT_NAME: heima-health
 * NAME: OrderDao
 * AUTHOR: lyz
 * DATE: 2023/9/3
 * DESCRIPTION : TODO
 */
@Mapper
public interface OrderDao {
    @Select("select count(id) from heima_health.t_order where orderDate = #{now}")
    Integer getOrderCountByDate(LocalDate now);

    @Select("select count(id) from heima_health.t_order where orderDate >= #{date}")
    Integer getOrderCountAfterDate(LocalDate date);

    @Select("select count(id) from heima_health.t_order where orderDate = #{now} and orderStatus = '已到诊'")
    Integer getVisitsCountByDate(LocalDate now);

    @Select("select count(id) from heima_health.t_order where orderDate >= #{date} and orderStatus = '已到诊'")
    Integer getVisitsCountAfterDate(LocalDate date);

    List<HotSetmeal> getHotSetmeal();
}
